home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / lio_listio.z / lio_listio
Text File  |  1998-10-20  |  15KB  |  199 lines

  1.  
  2.  
  3.  
  4. LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))                                                    LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lio_listio, lio_listio64 - linked asynchronous I/O operations
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<aaaaiiiioooo....hhhh>>>>
  13.  
  14.      iiiinnnntttt lllliiiioooo____lllliiiissssttttiiiioooo((((iiiinnnntttt mmmmooooddddeeee,,,, aaaaiiiiooooccccbbbb____tttt **** ccccoooonnnnsssstttt lllliiiisssstttt[[[[]]]],,,, iiiinnnntttt nnnneeeennnntttt,,,, ssssiiiiggggeeeevvvveeeennnntttt____tttt ****ssssiiiigggg))));;;;
  15.  
  16.      iiiinnnntttt lllliiiioooo____lllliiiissssttttiiiioooo66664444((((iiiinnnntttt mmmmooooddddeeee,,,, aaaaiiiiooooccccbbbb66664444____tttt **** ccccoooonnnnsssstttt lllliiiisssstttt[[[[]]]],,,, iiiinnnntttt nnnneeeennnntttt,,,, ssssiiiiggggeeeevvvveeeennnntttt____tttt ****ssssiiiigggg))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      The lllliiiioooo____lllliiiissssttttiiiioooo function allows the calling process to initiate a list of
  20.      I/O requests with a single function call.
  21.  
  22.      The lllliiiioooo____lllliiiissssttttiiiioooo66664444() function is identical to lllliiiioooo____lllliiiissssttttiiiioooo() except that it
  23.      takes an  array of aaaaiiiiooooccccbbbb66664444____tttt * (see <_a_i_o._h>).  This structure allows for
  24.      the specification of a file offset greater than 2 Gigabytes.
  25.  
  26.      The mmmmooooddddeeee argument takes a value of either LIO_WAIT or LIO_NOWAIT and
  27.      determines whether the function returns when the I/O operations have been
  28.      completed, or as soon as the operations have been queued. If the mmmmooooddddeeee
  29.      argument is LIO_WAIT, the function waits until all I/O is complete and
  30.      the ssssiiiigggg argument is ignored.
  31.  
  32.      If the mmmmooooddddeeee argument is LIO_NOWAIT, the function returns immediately, and
  33.      signal delivery shall occur, according to the ssssiiiigggg argument, when all the
  34.      I/O operations complete. If ssssiiiigggg is NULL, then no signal delivery occurs
  35.      at the completion of all the items in the list, however notifications for
  36.      each item in the list will happen according to their aaaaiiiiooooccccbbbb---->>>>aaaaiiiioooo____ssssiiiiggggeeeevvvveeeennnntttt
  37.      structures.  If ssssiiiigggg is not NULL then notification will happen according
  38.      to ssssiiiigggg---->>>>ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy when all items in the list have completed their I/O
  39.      operations.
  40.  
  41.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____NNNNOOOONNNNEEEE, then no notification will be posted to the
  42.      calling application.
  43.  
  44.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____SSSSIIIIGGGGNNNNAAAALLLL, then the signal specified in ssssiiiiggggeeeevvvv____ssssiiiiggggnnnnoooo
  45.      will be sent to the calling process. If SSSSAAAA____SSSSIIIIGGGGIIIINNNNFFFFOOOO is set for the signal
  46.      (see ssssiiiiggggaaaaccccttttiiiioooonnnn((((2222))))) and the signal is in the range of SSSSIIIIGGGGRRRRTTTTMMMMIIIINNNN and
  47.      SSSSIIIIGGGGRRRRTTTTMMMMAAAAXXXX then the signal will be queued to the process and the value in
  48.      ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee will be the ssssiiii____vvvvaaaalllluuuueeee in the generated signal.
  49.  
  50.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____CCCCAAAALLLLLLLLBBBBAAAACCCCKKKK then the function ssssiiiiggggeeeevvvv____ffffuuuunnnncccc will be
  51.      called with ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee as the argument. Only one callback will be called
  52.      at a time, however programs should be careful to note that a callback may
  53.      be run in parallel with the calling process.
  54.  
  55.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____TTTTHHHHRRRREEEEAAAADDDD then the function ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy____ffffuuuunnnnccccttttiiiioooonnnn
  56.      will be called by a new thread (see pppptttthhhhrrrreeeeaaaaddddssss((((5555))))) with ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee as the
  57.      argument.  This thread is created when the event arrives with the
  58.      attributes specified in ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy____aaaattttttttrrrriiiibbbbuuuutttteeeessss except that it is
  59.      automatically detached.  The calling process should ensure there are
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))                                                    LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))
  71.  
  72.  
  73.  
  74.      sufficient resources to create the thread.
  75.  
  76.      The lllliiiisssstttt argument is a pointer to an array of pointers to aaaaiiiiooooccccbbbb
  77.      structures. The array contains nnnneeeennnntttt elements.
  78.  
  79.      The I/O requests enumerated by list are submitted in an unspecified order
  80.      unless the file was opened with the OOOO____AAAAPPPPPPPPEEEENNNNDDDD in which case the write
  81.      operations will happen in the order that they appear in the list.
  82.  
  83.      The aaaaiiiioooo____lllliiiioooo____ooooppppccccooooddddeeee field of each aaaaiiiiooooccccbbbb structure specifies the operation
  84.      to be performed. The supported operations are LLLLIIIIOOOO____RRRREEEEAAAADDDD, LLLLIIIIOOOO____WWWWRRRRIIIITTTTEEEE, and
  85.      LLLLIIIIOOOO____NNNNOOOOPPPP.  The LLLLIIIIOOOO____NNNNOOOOPPPP operation causes that list entry to be ignored. If
  86.      the aaaaiiiioooo____lllliiiioooo____ooooppppccccooooddddeeee element is equal to LLLLIIIIOOOO____RRRREEEEAAAADDDD, then an I/O operation is
  87.      submitted as if by a call to aaaaiiiioooo____rrrreeeeaaaadddd(((()))) with the aaaaiiiiooooccccbbbbpppp equal to the
  88.      address of the aiocb ssssttttrrrruuuuccccttttuuuurrrreeee.... IIIIffff tttthhhheeee aaaaiiiioooo____lllliiiioooo____ooooppppccccooooddddeeee element is equal to
  89.      LLLLIIIIOOOO____WWWWRRRRIIIITTTTEEEE, then an I/O operation is submitted as if by a call to
  90.      aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) with the aaaaiiiiooooccccbbbbpppp equal to the address of the aaaaiiiiooooccccbbbb structure.
  91.  
  92. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  93.      aio_read(3), aio_write(3), aio_error(3), aio_return(3), aio_cancel(3),
  94.      aio_sgi_init(3), aio_hold(3), aio_fsync(3), read(2), lseek(2), close(2),
  95.      _exit(2), exec(2), fork(2), pthreads(5).
  96.  
  97. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  98.      If the mmmmooooddddeeee argument has the value LIO_NOWAIT, the lllliiiioooo____lllliiiissssttttiiiioooo(((()))) function
  99.      returns the value 0 to the calling process if the I/O operations are
  100.      successfully queued; otherwise, the function shall return the value -1
  101.      and set _e_r_r_n_o to indicate the error.
  102.  
  103.      If the mmmmooooddddeeee argument has the value LLLLIIIIOOOO____WWWWAAAAIIIITTTT, the lllliiiioooo____lllliiiissssttttiiiioooo(((())))function
  104.      returns the value 0 to the calling process when all the indicated I/O has
  105.      completed successfully. Otherwise, lllliiiioooo____lllliiiissssttttiiiioooo(((()))) returns -1 to the calling
  106.      process, and sets _e_r_r_n_o to indicate the error.
  107.  
  108.  
  109.      In either case, the return value only indicates the success or failure of
  110.      the lllliiiioooo____lllliiiissssttttiiiioooo(((()))) call itself, not the status of the individual I/O
  111.      requests. In some cases one or more of the I/O requests contained in the
  112.      list may fail. Failure of an individual request does not prevent
  113.      completion of any other individual request. To determine the outcome of
  114.      each I/O request, the application shall examine the error status
  115.      associated with each aaaaiiiiooooccccbbbb control block.  The error statuses returned
  116.      are identical to those returned as the result of an aaaaiiiioooo____rrrreeeeaaaadddd((((3333)))) or
  117.      aaaaiiiioooo____wwwwrrrriiiitttteeee((((3333)))) function.
  118.  
  119.      If any of the following conditions occur, the lllliiiioooo____lllliiiissssttttiiiioooo(((()))) function shall
  120.      return -1 and set _e_r_r_n_o to the corresponding value:
  121.  
  122.      [EAGAIN]       The resources necessary to queue all the I/O requests were
  123.                     not available. The application may check the error status
  124.                     for each _a_i_o_c_b to determine the individual request(s) that
  125.                     failed.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))                                                    LLLLIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO((((3333))))
  137.  
  138.  
  139.  
  140.      [EAGAIN]       The number of entries indicated by nnnneeeennnntttt would cause the
  141.                     system wide limit ____AAAAIIIIOOOO____MMMMAAAAXXXX to be exceeded.
  142.  
  143.      [EINVAL]       The mmmmooooddddeeee argument is not a proper value. The value of nnnneeeennnntttt
  144.                     was greater than ____AAAAIIIIOOOO____LLLLIIIISSSSTTTTIIIIOOOO____MMMMAAAAXXXX.
  145.  
  146.      [EINTR]        A signal was delivered while waiting for all I/O requests
  147.                     to complete during a LLLLIIIIOOOO____WWWWAAAAIIIITTTT operation. Note that, since
  148.                     each I/O operation invoked by lllliiiioooo____lllliiiissssttttiiiioooo(((()))) may possibly
  149.                     provoke a signal when it completes, this error return may
  150.                     be caused by the completion of one (or more) of the very
  151.                     I/O operations being awaited. Outstanding I/O requests are
  152.                     not canceled, and the application shall examine each list
  153.                     element to determine whether the request was initiated,
  154.                     canceled or completed.
  155.  
  156.      [EIO]          One or more of the individual I/O operations failed. The
  157.                     application may check the error status for each aaaaiiiiooooccccbbbb
  158.                     structure to determine the individual request(s) that
  159.                     failed. It is not possible to receive this error return
  160.                     when the mmmmooooddddeeee argument to the lllliiiioooo____lllliiiissssttttiiiioooo(((()))) request was
  161.                     LLLLIIIIOOOO____NNNNOOOOWWWWAAAAIIIITTTT....
  162.  
  163.      In addition to the errors returned by the lllliiiioooo____lllliiiissssttttiiiioooo(((()))) function, if the
  164.      lllliiiioooo____lllliiiissssttttiiiioooo(((()))) function succeeds or fails with errors of EAGAIN, EINTR or
  165.      ERIO, then some of the I/O operations specified by the list may have been
  166.      initiated. The I/O operation indicated by each list element can encounter
  167.      errors specific to the individual read or write function being performed.
  168.      In this event, the error status for each aaaaiiiiooooccccbbbb control block contains the
  169.      associated error code. The error codes which can be set are the same as
  170.      would be set by a _r_e_a_d(_2) or _w_r_i_t_e(_2) function, with the following error
  171.      codes possible:
  172.  
  173.      [EAGAIN]       The requested asynchronous I/O operation was not queued
  174.                     due to system resource limitations.
  175.  
  176.      [ECANCELED]    The requested I/O was canceled before the I/O completed
  177.                     due to an explicit aaaaiiiioooo____ccccaaaannnncccceeeellll((((3333)))) request.
  178.  
  179.      [EINPROGRESS]  The requested I/O is in progress.
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.